<!DOCTYPE html>
<html>

<head>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>应用菜单管理</title>
  <meta name="keywords" content="">
  <meta name="description" content="">

  <link rel="shortcut icon" href="favicon.ico">
  <link href="../css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
  <link rel="stylesheet" type="text/css" href="../tree_grid/themes/default/easyui.css">
  <link rel="stylesheet" type="text/css" href="../tree_grid/themes/icon.css">
  <link rel="stylesheet" type="text/css" href="../tree_grid/demo.css">
  <link rel="stylesheet" type="text/css" href="../css/labMgt/modal.css">

  <script src="../js/jquery.min.js?v=2.1.4"></script>
  <script src="../js/bootstrap.min.js?v=3.3.6"></script>
  <script type="text/javascript" src="../tree_grid/jquery.easyui.min.js"></script>
  <script type="text/javascript" src="../tree_grid/treegrid-dnd.js"></script>

  <script type="text/javascript"  src="../js/content/application_menu.js"></script>
</head>

<body class="gray-bg">
  <div class="wrapper wrapper-content animated fadeInRight">

    <div class="row" style="margin:10px 0">
      <button class="btn btn-sm btn-primary" type="submit">保存</button>
    </div>

    <table id="treegrid" title="应用菜单管理" class="easyui-treegrid" style="width:100%;height:300px"
        data-options="
                rownumbers: true,
                idField: 'id',
                treeField: 'name',
                onContextMenu: onContextMenu,
                onLoadSuccess: function(row){
                  $(this).treegrid('enableDnd', row?row.id:null);
                }
            ">
      <thead>
        <tr>
          <th data-options="field:'name'" width="20%">菜单名称</th>
          <th data-options="field:'size'" width="20%" align="center">URL</th>
          <th data-options="field:'size'" width="20%" align="center">图标</th>
          <th data-options="field:'size'" width="20%" align="center">类型</th>
          <th data-options="field:'date'" width="20%" align="center">说明</th>
        </tr>
      </thead>
    </table>

    <div id="treegrid_menu" class="easyui-menu" style="width:120px;">
      <div data-toggle="modal" data-target="#addForm">新增节点</div>
      <div data-toggle="modal" data-target="#addForm">新增子节点</div>
      <div class="menu-sep"></div>
      <div>向上移到</div>
      <div >向上移到</div>
      <div class="menu-sep"></div>
      <div data-toggle="modal" data-target="#addForm">编辑节点</div>
      <div>删除节点</div>
    </div>
  </div>

  <!-- form 表单弹框 新增addForm -->
  <div class="modal fade" id="addForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
          <h5 class="modal-title" id="myModalLabel">新增用户</h5>
        </div>
        <div class="modal-body">
          <form>
            <table class="form-table">
              <tbody>
                <tr>
                  <td class="title">菜单名称：</td>
                  <td>
                    <input name="username" type="text"> <b>*</b>
                  </td>
                </tr>
                <tr>
                  <td class="title">URL：</td>
                  <td>
                    <input name="loginName" type="text"></td>
                </tr>
                <tr>
                  <td class="title">图标：</td>
                  <td>
                    <select id="">
                      <option>请选择</option>
                      <option value="1">应用</option>
                      <option value="0">应用</option>
                    </select>
                  </td>
                </tr>
                <tr>
                  <td class="title">类型：</td>
                  <td>
                    <input name="gmsfhm" type="text"> <b>*</b>
                  </td>
                </tr>
                <tr>
                  <td class="title">上级菜单：</td>
                  <td>
                    <input name="email" type="text">
                    <b>*</b>
                  </td>
                </tr>
                <tr>
                  <td class="title">是否隐藏：</td>
                  <td>
                    <select id="">
                      <option>请选择</option>
                      <option value="1">是</option>
                      <option value="0">否</option>
                    </select>
                  </td>
                </tr>
                <tr>
                  <td class="title">描述：</td>
                  <td>
                    <textarea name="note" type="text"></textarea>
                  </td>
                </tr>
              </tbody>
            </table>
          </form>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
          <button type="button" class="btn btn-primary">确定</button>
        </div>
      </div>
    </div>
  </div>
</body>

</html>